<?php
$host = 'localhost';
$user = 'root';
$pass = 'abc123';
$dbname = 'dsccmis';

if (!$db = mysql_connect($host, $user, $pass)) {
	echo 'Could not connect to mysql';
	exit;
}
if (!mysql_select_db($dbname, $db)) {
	echo 'Could not select database';
	exit;
}
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
//XML Header
header("content-type:text/xml");
$query = "update event set evndte='$evndte',evnplcid='$evnplcid',evntme='$evntme' where recordid=$recordid";
//$query = "SELECT VILLAGE_ID, VILL_NAME, lat, lng FROM village5prov WHERE (prov in ".$prov.") and (lat >=".$left.") and (lat <=".$right.") and (lng >=".$bottom.") and (lng <=".$top.")";
mysql_query("set names utf8");
$rs = mysql_query($query);
if($rs){
	$message="update complete = $rs";
}else{
	$message="update fail = $rs";
}
echo $query;
//echo $message;
//echo "<message>";
//while ($row=mysql_fetch_assoc($query)){
//	echo '<location id="'.$row['VILLAGE_ID'].'" name="'.$row['VILL_NAME'].'" lat="'.$row['lat'].'" lng="'.$row['lng'].'"/>';
//}
//echo "<message data='$message'">
//echo "</message>";

?>
